Skip to content

Conversation

@debjit-bw
Copy link
Member

@debjit-bw debjit-bw commented Oct 2, 2025

Introduces a Gnosis-specific CLI (GnosisCli) with a new ImportEra command to support ERA block imports. The ERA import logic, adapted from Reth, has been customized to directly import receipts from ERA files instead of executing blocks to generate them — a Gnosis-specific modification.

- Introduced `ImportEraCommand` to handle importing chains from ERA files.
- Created `era.rs` and `import_era.rs` for ERA-related functionalities.
- Updated `mod.rs` files to include new modules.
- Refactored `main.rs` to utilize the new `GnosisCli` structure.
- Added necessary dependencies in `Cargo.toml` and `Cargo.lock`.
@debjit-bw debjit-bw changed the title Era Imports for Gnosis feat: support Era Imports for Gnosis (full history 2/2) Oct 14, 2025
@debjit-bw debjit-bw changed the title feat: support Era Imports for Gnosis (full history 2/2) feat: support Era Imports for Gnosis (full history 2 of 2) Oct 14, 2025
@debjit-bw debjit-bw marked this pull request as ready for review October 14, 2025 11:09
Copy link
Member

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good!

src/cli/era.rs Outdated
@@ -0,0 +1,358 @@
// Bulk is from https://github.com/debjit-bw/reth/blob/994d73edf63f2a17cdc9c1e32338dcd81c165905/crates/era-utils/src/history.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link paradigmxyz repo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these notes!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah mb, fixed

@@ -0,0 +1,125 @@
// File copied from https://github.com/paradigmxyz/reth/blob/94c93583af801a75ae5bb96080d21dc1851325fa/crates/cli/commands/src/import_era.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain why this file has to be copied

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

pub mod download_init_state;
pub mod import_and_ensure_state;

pub const MAINNET_ERA_IMPORT_HEIGHT: u64 = 26478650; // Gnosis mainnet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment that this is the merge block

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@debjit-bw debjit-bw requested a review from dapplion October 29, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants